
export const ismore_fun = (count, page, size) => {
	var more = 0;

	var last_page = Math.ceil(count / size);      //总页数、也是最后一页

	if (last_page && last_page > page) {
		more = 1;
	}
	return more;
}

//获取url后的参数  以对象返回
export function strToParams(str) {
	var newparams = {}
	for (let item of str.split('&')) {
		newparams[item.split('=')[0]] = item.split('=')[1]
	}
	return newparams
}

//对象参数转为以？&拼接的字符
export function paramsToStr(params) {
	let p = '';
	if (typeof params == 'object') {
		p = '?'
		for (let props in params) {
			p += `${props}=${params[props]}&`
		}
		p = p.slice(0, -1)
	}
	return p
}



